﻿namespace WeWork.Model
{
    /// <summary>
    /// 在线文档消息
    /// </summary>
    public class ChatDocMsg : MsgChatRoomBase
    {
        /*
        {
            "msgid":"9732089160923053207_1603877765",
            "action":"send",
            "from":"ken",
            "tolist":["icef","test"],
            "roomid":"wrJawBCQAAStr3jxVxEH",
            "msgtime":1603877765291,"msgtype":
            "docmsg",
            "doc":{
                "title":"测试&演示客户",
                "doc_creator":"test",
                "link_url":"https://doc.weixin.qq.com/txdoc/excel?docid=xxx"
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public DocMsgInfo doc { set; get; }
    }

    public class DocMsgInfo
    {
        /// <summary>
        /// 在线文档名称
        /// </summary>
        public string title { set; get; }
        /// <summary>
        /// 在线文档创建者。本企业成员创建为userid；外部企业成员创建为external_userid
        /// </summary>
        public string doc_creator { set; get; }
        /// <summary>
        /// 在线文档链接
        /// </summary>
        public string link_url { set; get; }
    }
}
